package cn.kgc.jjl.exception;

public class AgeExcepitionTest {
	public static void main(String[] args) {

		try {
			testAge();
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
		}
	public static void testAge() throws AgeException01{
		int age =19;
		if (age<18||age>80) {
			System.out.println("年级不合法，需要陪同人员");
			
		} else {
			System.out.println("恭喜您成功办理入住");

		}
		
	}

}
